<%@ page language="java" import="java.util.*"
	contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>餐厅管理</title>
<script type="text/javascript"
	src="/QueenRestaurantWeb/resources/js/jquery-1.10.1.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		$.get("${pageContext.request.contextPath}/restaurant/info", function(data, status) {
			$("#content").replaceWith('<div id="content">' + data + '</div>');
		});
	});
	$(document).ready(function() {
		$("#restaurant_info_li").click(function() {
			getInfo();
		});
		$("#restaurant_table_li").click(function(){
			getTables();
		});
		$("#restaurant_coures_type_li").click(function(){
			getCourseType();
		});
	});
	function getTables() {
		$.get("${pageContext.request.contextPath}/restaurant/table", function(data, status) {
			$("#content").replaceWith('<div id="content">' + data + '</div>');
		});
	}
	function getInfo(){
		$.get("${pageContext.request.contextPath}/restaurant/info",function(data, status) {
			$("#content").replaceWith('<div id="content">' + data+ '</div>');
		});
	}
	function getCourseType(){
		$.get("${pageContext.request.contextPath}/restaurant/course_type",function(data, status) {
			$("#content").replaceWith('<div id="content">' + data+ '</div>');
		});
	}
</script>
<!--
		<link href="layout.css"
		rel="stylesheet" type="text/css" />
	-->
<link
	href="/QueenRestaurantWeb/resources/css/restaurant_info_layout.css"
	rel="stylesheet" type="text/css" />
</head>

<body>
	<div id="container">
		<div id="header">
			<button id="test">test</button>
			This is the Header
		</div>
		<div id="mainContent">
			<div id="sidebar">
				<ul>
					<li id="restaurant_info_li">基本信息</li>
					<li id="restaurant_table_li">餐桌管理</li>
					<li id="restaurant_coures_type_li">菜品类别</li>
					<li id="restaurant_course_li">菜品管理</li>
					<li id="restaurant_order_li">订单管理</li>
				</ul>
			</div>
			<div id="content">
			</div>
		</div>
		<div id="footer">This is the footer</div>
	</div>


</body>
</html>
